package com.aspose.cells;

class zmu extends zmt {
   private boolean d;

   zmu(zaay var1, zzn var2, boolean var3) {
      super(var1, var2);
      this.d = var3;
   }

   public int a() {
      return 1;
   }

   public zagu b() {
      return this.d ? zyx.a : zyw.a;
   }

   public boolean a(zagu var1) {
      return var1.b() == 1 ? this.b(var1) : this.c;
   }

   public boolean b(zagu var1) {
      if (this.b) {
         if (this.d) {
            return var1 == zyx.a;
         } else {
            return var1 == zyw.a;
         }
      } else if (this.c) {
         if (this.d) {
            return var1 == zyw.a;
         } else {
            return var1 == zyx.a;
         }
      } else if (this.d) {
         return var1 == zyx.a ? this.a.a(0) : this.a.a(-1);
      } else {
         return var1 == zyx.a ? this.a.a(1) : this.a.a(0);
      }
   }

   public int c(zagu var1) {
      if (this.d) {
         return var1 == zyx.a ? 0 : -1;
      } else {
         return var1 == zyx.a ? 1 : -1;
      }
   }

   static int a(zagu var0, boolean var1, zaay var2) {
      switch(var0.b()) {
      case 1:
         return a(((zyv)var0).k(), var1);
      case 2:
         if (var2.d.n()) {
            if (var1) {
               return -1;
            }

            return 0;
         }

         return -1;
      case 3:
         if (var2.d.n()) {
            if (var1) {
               return ((zyy)var0).p();
            }

            return ((zyy)var0).o();
         }

         return -1;
      case 12:
         return var1 ? -1 : 0;
      default:
         if (var2.p.Q.i.a) {
            com.aspose.cells.a.c.zl.a("Unsupported node type to compare with Boolean: " + var0.b());
         }

         return -1;
      }
   }

   static int a(boolean var0, boolean var1) {
      if (var0 == var1) {
         return 0;
      } else {
         return var0 ? 1 : -1;
      }
   }

   static boolean b(zagu var0, boolean var1, zaay var2) {
      switch(var0.b()) {
      case 0:
         return false;
      case 1:
         return ((zyv)var0).k() == var1;
      case 2:
         if (var2.d.n()) {
            return !var1;
         }

         return false;
      case 3:
         if (var2.d.n()) {
            return ((zyy)var0).k() == (var1 ? 1.0D : 0.0D);
         }

         return false;
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      default:
         if (var2.p.Q.i.a) {
            com.aspose.cells.a.c.zl.a("Unsupported node type to match Boolean: " + var0.b());
         }

         return false;
      case 12:
         return !var1;
      }
   }
}
